//
//  LBViewController.m
//  LBChooseView
//
//  Created by lulu1125 on 09/14/2017.
//  Copyright (c) 2017 lulu1125. All rights reserved.
//

#import "LBViewController.h"
#import "LBChooseView.h"

@interface LBViewController ()
@property (nonatomic, strong) LBChooseView *choose;
@end

@implementation LBViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    
}
- (IBAction)buttonClick:(id)sender {
    self.choose = [LBChooseView new];
    self.choose.chooseArray = @[@"李露露",@"李红",@"蔡钊",@"理论类"];
    self.choose.title = @"关系";
    self.choose.contenView.selectedIndex = 1;
    @weakify(self);
    [self.choose.contenView.cancleCallBack subscribeNext:^(id  _Nullable x) {
        @strongify(self);
        NSLog(@"点击了取消");
        [self.choose dismiss];
    }];
    [self.choose.contenView.sureCallBack subscribeNext:^(NSArray  *arr) {
        @strongify(self);
        NSLog(@"返回的数组 index0 = string index1 = index");
        [self.choose dismiss];
        
    }];
    [self.choose show];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
